home *** CD-ROM | disk | FTP | other *** search
/ Archive Magazine CD 1995 / Archive Magazine CD 1995.iso / discs / pipeline / abacus / p_line / Strings / ReadMe < prev    next >
Encoding:
Text File  |  1992-07-05  |  4.9 KB  |  122 lines

  1. %OP%VS4.13 (28-Apr-92), Gerald L Fitton, R4000 5966 9904 9938 
  2. %OP%DP0
  3. %OP%IRY
  4. %OP%PL0
  5. %OP%HM0
  6. %OP%FM0
  7. %OP%BM0
  8. %OP%LM4
  9. %OP%PT1
  10. %OP%PDPipeLine
  11. %OP%WC1014,2262,252,1748,0,0,0,0
  12. %CO:A,72,72%
  13. %C%Slot References to Strings
  14. %C%by Gerald L Fitton
  15. Keywords:
  16. Fitton
  17.  
  18. Slot references to strings
  19. Since PipeDream 4 now has comprehensive string handling, the action of 
  20. references to a text slot or a slot containing a string is different 
  21. from PipeDream 3.  Load the file [Strings] and see what you get with 
  22. your version of PipeDream 4.  I have version 4.11 at the moment so the 
  23. following summary may be changed.  Please let me know if you find a 
  24. difference and that will remind me to update this text.
  25.  
  26. One subtle difference between PipeDream 3 and PipeDream 4 is that a
  27. reference to a slot containing text greturns right aligned text even 
  28. when reference is made to a left aligned slot containing text.  Have a 
  29. look at [Strings]C8.  It refers to [Strings]A2 which contains the text 
  30. Hello.  In [Strings]A2 the text is left aligned, in [Strings]C8 (which 
  31. contains the slot reference A2) the text is right aligned.  You can 
  32. 'correct' this, as I have done with many of the files on this disc, by 
  33. giving the command <Ctrl LAL> (Layout Align Left).
  34.  
  35. Here is a summary.  Suppose:
  36.  
  37.  A1 contains:             nothing
  38.  A2 contains text slot:   Hello
  39.  A3 contains number slot: "Hello"
  40.  A4 contains number slot: 0
  41.  A5 contains number slot: " "
  42.  
  43. Formula                        in PipeDream     PD 3        PD 4
  44.  
  45. A1                                              0           blank
  46. A2                                              Hello       Hello
  47. A3                                              Hello       Hello
  48. A4                                              0           0
  49. A5                                              0           
  50.  
  51. 1+A1                                            1           1
  52. 1+A2                                            Hello       Error
  53. 1+A3                                            Hello       Error
  54. 1+A4                                            1           1
  55. 1+A5                                            1           1
  56.  
  57. if(A1="","Blank",if(A1=0,"Zero","Not empty"))   1           Blank
  58. if(A2="","Blank",if(A2=0,"Zero","Not empty"))   Not empty   Not empty
  59. if(A3="","Blank",if(A3=0,"Zero","Not empty"))   Not empty   Not empty
  60. if(A4="","Blank",if(A4=0,"Zero","Not empty"))   1           Zero
  61. if(A5="","Blank",if(A5=0,"Zero","Not empty"))   1           Blank
  62.  
  63. If you get the error message "String not expected" it's probably 
  64. because of an explicit reference to a slot containing a string. 
  65.  
  66. Functions like sum() are not affected since they are defined to ignore 
  67. non-numeric slots.
  68.  
  69.  
  70. %C%Comparison Rules
  71. %C%by Gerald L Fitton
  72. Keywords:
  73. Compare Comparison Fitton
  74.  
  75. Many spreadsheet commands such as if(condition,true,false) and 
  76. davg(range,condition) require a comparison between a numerical value 
  77. and some text.
  78.  
  79. PipeDream 3
  80. I know you may not be interested in PipeDream 3 but this is what 
  81. happens in PipeDream 3.  Numbers are always smaller than text so that 
  82. if(C21>="", true, false) will treat the condition as TRUE (and work out 
  83. the true formula) if it contains any text.  Dates are greater than 
  84. text.  Blank numeric cells are forced to match zero except for such 
  85. functions as avg(range) which treat a blank as nonexistent when 
  86. calculating the divisor.
  87.  
  88. PipeDream 4
  89. The disc file [Compare] in this directory shows what happens when you 
  90. make the same comparisons in PipeDream 4.  I am having trouble with 
  91. interpreting what is happening.  I have version 4.11.  The 
  92. file [Compare] shows the result of comparing a -1, 0, +1, a blank cell 
  93. and a cell containing a date with a blank, a text cell and a cell 
  94. containing a date.  If you study the formula in the file [Compare] it 
  95. may help you to if you find comparisons difficult.
  96.  
  97. Let me know how you get on with later versions of PipeDream 4.
  98.  
  99.  
  100.  
  101. %C%Text in Numeric Slots
  102. %C%by Gerald L Fitton
  103. Keywords:
  104. Text Numbers Fiton
  105.  
  106. What is the value returned by a formula that usually refers to a cell 
  107. with a number in it but which, for some reason, contains text instead?  
  108. Take as an example a file of invoices with £s in column C and the 15%PC% 
  109. VAT extension in column D.  The VAT in D21 is worked out with the 
  110. function 0.15*C21 (or, if you prefer, (INT(15*C21+0.99))/100 to round 
  111. up) but what if you can't find the invoice and want to write a comment 
  112. in C21 (eg Lost Invoice) instead of a value?  In column D the formula 
  113. returns the words (String not expected) from C21.  Perhaps you don't 
  114. want this, you may want either a blank or a 0.  The way to get a zero 
  115. is to use an if construct such as if(C21>="!",0,(0.15*C21)).  The file 
  116. VatFile in this directory is an example.
  117.  
  118. PipeDream 4 treats text in numeric slots this way so that, if you make 
  119. a mistake (or should I say when!) the words are displayed to show you 
  120. that there has been a mistake.  If the value of the text were made 0 
  121. automatically then you wouldn't spot the error so easily.
  122.